package com.jcake.vimlike.internal.registers;

public class Register {

	public enum Type {
		LINE_ORIENTED, RANGE_ORIENTED
	}

	private Character name;
	private boolean readOnly;
	private String content;
	private Type type;

	public Register(char i, boolean readOnly, Type type) {
		this.name = i;
		this.readOnly = readOnly;
		this.type = type;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public String getContent() {
		if (content == null) {
			content = "";
		}
		return content;
	}

	public boolean isReadOnly() {
		return readOnly;
	}

	public Character getName() {
		return name;
	}

	public void setContent(String content) {
		if (content == null) {
			this.content = "";
		} else {
			this.content = content;
		}
	}
}
